<?php $this->load->view('common/admin_header');?>
    <div class="block">
        <div class="block_head">
            <div class="bheadl"></div>
            <div class="bheadr"></div>
            <h2><?=$lang['admin_lable_5']?></h2>
        </div>
        <!-- .block_head ends -->
        <div class="block_content">
            <p class="breadcrumb"><?=$lang['global_lable_14']?> &raquo; <a href="<?=site_url('admins/index')?>"><?=$lang['global_lable_11']?></a> &raquo; <?=$lang['orders_lable_1']?> &raquo; <strong><?=$lang['orders_lable_5']?></strong></p>
            <?php $this->load->view('common/notify');?>
            <form action="<?=site_url('admins/posprint')?>" method="get">
                <input type="hidden" name="field" value="<?=isset($field)?$field:'n.sort_order'?>" id="field">
                <input type="hidden" name="sort" value="<?=isset($sort)?$sort:'asc'?>" id="sort">
                <table cellpadding="0" cellspacing="0" width="100%" class="sortable">
                    <thead>
                    <tr>
                        <th><a id="id" class="<?=isset($field) && $field=='id'?$sort:'';?>" href="#"><?=$lang['orders_lable_36']?></a></th>
                        <th><a id="name" class="<?=isset($field) && $field=='name'?$sort:'';?>" href="#"><?=$lang['orders_lable_37']?></a></th>
                        <th><a id="add_time" class="<?=isset($field) && $field=='add_time'?$sort:'';?>" href="#"><?=$lang['global_lable_18']?></a></th>
                        <th align="center"><?=lang('cart_action')?></th>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td><input type="text" class="stext" name="name" lang="zh-TW" x-webkit-speech x-webkit-grammar="bUIltin:search" value="<?=isset($name)?$name:''?>"></td>
                        <td>&nbsp;</td>
                        <td style="text-align:center">
                            <input type="submit" class="btn btn-small btn-primary" name="sub_filter" value="<?=$lang['global_lable_22']?>"/>
                            <a href="<?=site_url('admins/posprint/add')?>" class="btn btn-small btn-danger"><i class="icon-plus"></i> <?=$lang['global_lable_23']?></a>
                        </td>
                    </tr>
                    </thead>
                    <tbody class="table">
                    <?php if(isset($lists_count) && $lists_count>0):?>
                        <?php foreach($lists->result_array() as $list):
                            $urls=site_url("admins/posprint/%s/".$list['id']);
                            ?>
                            <tr>
                                <?php if($getlang=='zh-tw'):?>
                                    <td><?=$list['pos_title']?></td>
                                <?php else:?>
                                    <td><?=$list['pos_name']?></td>
                                <?php endif ;?>
                                <td><?=$list['pos_code']?></td>
                                <td><?=date($format_time,$list['add_time'])?></td>
                                <td class="listaction">
                                    <a href="<?=sprintf($urls,"edit");?>" class="l_edit"><?=$lang['global_lable_24']?></a>
                                    <a href="javascript:void(0);" onClick="delete_item('<?=sprintf($urls,"delete")?>');" class="l_delete">刪除</a>
                                </td>
                            </tr>
                        <?php endforeach;?>
                    <?php else:?>
                        <tr>
                            <td colspan="9" style="text-align:center" class="nodata"><p><?=$lang['global_lable_42']?></p></td>
                        </tr>
                    <?php endif;?>
                    </tbody>
                </table>
                <!-- .tableactions ends -->
                <div id="pagination"><?php echo $pagination;?><div class="listscount"><?=$lang['global_lable_29']?> <?=$lists_count?> <?=$lang['global_lable_30']?></div></div>
                <!-- .pagination ends -->
            </form>
        </div>
        <!-- .block_content ends -->
        <div class="bendl"></div>
        <div class="bendr"></div>
    </div>
    <!-- .block ends -->
<?php $this->load->view('common/admin_footer');?>